#include<bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int dis[100010];
int tot;
int back;
int ans;
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    ans=n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        dis[a[i]]++;
    }
    for(int i=1;i<=100000;i++){
        if(dis[i]==0) continue;
        tot++;
        if(tot==1){
            back=i;
            continue;
        }
        if(dis[i]<dis[back]){
            ans-=dis[i];
            dis[i]=dis[back];
        } else ans-=dis[back];
        back=i;
    }
    cout<<ans<<endl;
    return 0;
}